package com.weixinli.beans;

import java.io.Serializable;

public class Notice implements Serializable{
	private int nid;//编号
	private String ncontent;//公告内容
	private String ntime;
	private int nup;
	private static final long serialVersionUID = 1L;
	
	@Override
	public String toString() {
		return "Notice [nid=" + nid + ", ncontent=" + ncontent + ", ntime="
				+ ntime + ", nup=" + nup + "]";
	}

	public int getNid() {
		return nid;
	}

	public void setNid(int nid) {
		this.nid = nid;
	}

	public String getNcontent() {
		return ncontent;
	}

	public void setNcontent(String ncontent) {
		this.ncontent = ncontent;
	}

	public String getNtime() {
		return ntime;
	}

	public void setNtime(String ntime) {
		this.ntime = ntime;
	}

	public int getNup() {
		return nup;
	}

	public void setNup(int nup) {
		this.nup = nup;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((ncontent == null) ? 0 : ncontent.hashCode());
		result = prime * result + nid;
		result = prime * result + ((ntime == null) ? 0 : ntime.hashCode());
		result = prime * result + nup;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Notice other = (Notice) obj;
		if (ncontent == null) {
			if (other.ncontent != null)
				return false;
		} else if (!ncontent.equals(other.ncontent))
			return false;
		if (nid != other.nid)
			return false;
		if (ntime == null) {
			if (other.ntime != null)
				return false;
		} else if (!ntime.equals(other.ntime))
			return false;
		if (nup != other.nup)
			return false;
		return true;
	}

	public Notice(int nid, String ncontent, String ntime, int nup) {
		super();
		this.nid = nid;
		this.ncontent = ncontent;
		this.ntime = ntime;
		this.nup = nup;
	}

	public Notice() {
		super();
	}
}
